package com.gdougms.service.Impl;

import com.gdougms.entity.Equipment;
import com.gdougms.mapper.EquipmentMapper;
import com.gdougms.service.EquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class EquipmentServiceImpl implements EquipmentService {

    @Autowired
    EquipmentMapper equipmentMapper;

    @Override
    public List<Equipment> equipList() {
        return equipmentMapper.equipList();
    }

    @Override
    public List<Equipment> getEquipByName(String name) {
        return equipmentMapper.getEquipByName(name);
    }

    @Override
    public int addEquip(String name, Integer number, BigDecimal cost, String remark) {
        return equipmentMapper.addEquip(name, number, cost, remark);
    }

    @Override
    public int deleteEquipById(Integer id) {
        return equipmentMapper.deleteEquipById(id);
    }

    @Override
    public int updateEquipById(Integer id, String name, Integer number, BigDecimal cost, String remark) {
        return equipmentMapper.updateEquipById(id, name, number, cost, remark);
    }

    @Override
    public List<String> getAllEquipName() {
        return equipmentMapper.getAllEquipName();
    }

    @Override
    public List<BigDecimal> getAllEquipCost() {
        return equipmentMapper.getAllEquipCost();
    }
}
